import time
from selenium import webdriver
from selenium.webdriver.common.by import By
import pyperclip
from pykeyboard.mac import PyKeyboard
from pymouse import PyMouse

driver = webdriver.Chrome()
driver.maximize_window()
driver.get('https://www.iviewui.com/view-ui-plus/component/form/upload')
driver.implicitly_wait(10)
driver.find_element(By.XPATH, '//button[@class="ivu-btn ivu-btn-default"]').click()
# time.sleep(2)
k = PyKeyboard()
m = PyMouse()
time.sleep(2)
k.press_keys(['Command', 'Shift', 'G'])
# 粘贴斜杠/
pyperclip.copy("/")
k.press_keys(['Command', 'V'])
time.sleep(2)
# 不可以使用中文
k.type_string("/Users/tester/Downloads/LATEST_RELEASE")
k.tap_key('Return', n=2, interval=3)
time.sleep(3)
